<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html;charset=utf-8" isELIgnored="false" %>

<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  <title> </title>
  <link rel="icon" href="../favicon.ico" type="image/ico">
  <meta name="keywords">
  <meta name="author" content="yinqi">
  <link href="${base}/css/bootstrap.min.css" rel="stylesheet">
  <link href="${base}/css/materialdesignicons.min.css" rel="stylesheet">
  <!--标签插件-->
  <link rel="stylesheet" href="${base}/js/jquery-tags-input/jquery.tagsinput.min.css">
  <link href="${base}/css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="container-fluid">

  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          <form action="${base}/study/addNote" method="post"
                enctype="multipart/form-data" class="row">
            <div class="form-group col-md-12">
              <label for="role">分类</label>
              <div class="form-controls">
                <select class="form-control" id="a" name="cid" size="1">
                  <c:forEach var="r" items="${list}">
                    <option value="${r.cid}">${r.cname}</option>
                  </c:forEach>
                </select>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="name">标题</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="name" name="title" value="" placeholder="请输入标题" />
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-12" for="example-textarea-input">内容</label>
              <div class="col-xs-12">
                <textarea class="form-control" id="example-textarea-input" name="content" rows="6" placeholder="内容.."></textarea>
              </div>
            </div>
            <div class="form-group">
              <label for=>是否共享</label>
              <div class="controls-box">
                <label class="lyear-radio radio-inline radio-primary">
                  <input type="radio" name="share" value="0" checked><span>是</span>
                </label>
                <label class="lyear-radio radio-inline radio-primary">
                  <input type="radio" name="share" value="1"><span>否</span>
                </label>
              </div>
            </div>

            <div class="form-group" >
              <label for="upload_file_size">参考资源</label>
              <input class="form-control" type="file" id="upload_file_size" name="fileName" value="0" placeholder="请输入文件上传大小限制" >
              <small class="help-block">0为不限制大小，单位：kb</small>
            </div>

            <div class="form-group col-md-12">
              <button type="submit" class="btn btn-primary ajax-post" target-form="add-form">提交</button>
              <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
          </form>

        </div>
      </div>
    </div>

  </div>

</div>

<script type="text/javascript" src="${base}/js/jquery.min.js"></script>
<script type="text/javascript" src="${base}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${base}/js/perfect-scrollbar.min.js"></script>
<!--标签插件-->
<script src="${base}/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="${base}/js/main.min.js"></script>
</body>
</html>
<script>
  function cli(){
    //获取文件组件对象触发单击事件
    document.getElementById("myHead").click();
  }
  function show(obj) {
    var imgFile=obj.files[0];
    var src=window.URL.createObjectURL(imgFile);
    document.getElementById("img").setAttribute("src",src);
  }
</script>